﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Sales_Consume_Customer.aspx.cs" Inherits="JKF.Web.Sales.Consume.Sales_Consume_Customer" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <%= RegScript("~/js/jquery.1.5.js")%>
    <%= RegScript("~/js/jquery.nhis.js")%>
    <%= RegScript("~/js/jquery.rchis.js")%>
    <%= RegScript("~/js/jquery-ui-custom.min.js")%>
    <%=RegScript("~/js/jquery.json.js")%>
    <%= RegScript("~/js/css.js")%>
    <%= RegScript("~/js/DatePicker/WdatePicker.js")%>
    <%= RegScript("~/js/Common.js")%>
    <%= RegScript("~/js/Jquery.commonGrid.js")%>
    <%=this.RegStyle("~/App_Themes/Theme2/Include.css")%>
    <script type="text/javascript">
        var isView = '<%=IsView%>'; //是否有浏览权限
        var AppPath = '<%=AppPath %>';
        var handler = AppPath + '/do/Sales/Sales_Consume.do';
        var customerKey = '<%=P("customerKey") %>'; //人员主键
        var tmpl = new DTemplate();
        var rowTemplate = "<tr pk=\"${CONSUME_KEY}\"><td>${UNIQUE_CODE}</td><td>${CARD_NO}</td><td>${CUSTOMER_NAME}</td><td>${MOBILE}</td><td>${PHONE}</td><td>${PRODUCTNAME}</td><td>${MODEL}</td><td>${WAY_NAME}</td><td>${REGISTER_DATE}</td><td>${MONEY}</td><td>${ADD_POINT}</td><td>${STATUS}</td><td>${OPERATER}</td><td>${MEMO}</td><td>${DATE_CREATE}</td></tr>";

        $(function () { BindConsumeInfo(); });

        function BindConsumeInfo() {
            var tbody = $('#tb tbody');
            tbody.empty();

            $.post(handler, { ActionName: "GetConsumeByCustomer", customerKey: customerKey }, function (data) {
                if (data.Success) {
                    var tbody = $('#tb tbody');
                    tbody.empty();
                    if (data.Data && data.Data.length > 0) {
                        tbody.html(tmpl(rowTemplate, data.Data, true));
                    } else {
                        tbody.append($("<tr><td colspan='16'>没有数据.</td></tr>"));
                    }
                    return false;
                }
                alert(data.Message);
            }, "json");
        }
    </script>
</head>
<body style="height: auto;">
    <form id="form1" runat="server">
        <div class="index_table">
            <div>
                <div style="width: 1850px; height: 450px; overflow: auto; overflow-x: hidden;">
                    <table id="tb" border="0" cellspacing="0" cellpadding="0" class="common_table">
                        <thead>
                            <tr>
                                <th width="160px">单号
                                </th>
                                <th width="120px" ordertype="string">顾客卡号
                                </th>
                                <th width="100px" ordertype="string">姓名
                                </th>
                                <th width="100px" ordertype="string">手机
                                </th>
                                <th width="120px" ordertype="string">电话号码
                                </th>
                                <th width="200px" ordertype="string">配件/耗材名称
                                </th>
                                <th width="100px" ordertype="string">规格
                                </th>
                                <th width="100px" ordertype="string">方式
                                </th>
                                <th width="140px">登记日期
                                </th>
                                <th width="140px">实收金额
                                </th>
                                <th width="140px">增加积分
                                </th>
                                <th width="100px">状态
                                </th>
                                <th width="100px">操作员
                                </th>
                                <th width="100px">备注
                                </th>
                                <th width="140px">录入日期
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td colspan="16" style="text-align: center">暂无数据</td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </form>
</body>
</html>
